PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Scope of Script Properties

Like the scope of a variable, the scope of a script property determines where else in a script you may refer to the same property identifier. The scope of a property in turn depends on where you declare it.

You can declare a property at the top level of a script or at the top level of a script object. If you declare it at the top level of a script, a property identifier is visible throughout the script. If you declare it at the top level of a script object, a property identifier is visible only within that script object. After declaring a property, you can use the same identifier as a separate variable only if you first declare it as a local variable.

For detailed information and examples of the use of properties in subroutines, see Scope of Script Variables and Properties.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)